Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.

the function TranslateCallStatement ( NULL Pointer Dereference ) - #270

Open
BigGan wants to merge 1 commit into
microsoft:masterfrom
BigGan:master
Open

the function TranslateCallStatement ( NULL Pointer Dereference )#270
BigGan wants to merge 1 commit into
microsoft:masterfrom
BigGan:master

Conversation

@BigGan

@BigGan BigGan commented Jul 20, 2020

Copy link
Copy Markdown

In the function TranslateCallStatement (Sources/SolToBoogie/ProcedureTranslator.cs), the parameter outParams may be null. However, This code BoogieIdentifierExpr tmpVarExpr = outParams[0]; will call directly outParams[0] without judging whether the outParams is null.

Test Case( Test.sol ):

pragma solidity >=0.4.20;
contract Test {
function BugTest() public {
msg.sender.call.value(123)("");
}
}

In the function TranslateCallStatement (Sources/SolToBoogie/ProcedureTranslator.cs), the parameter outParams may be null. However, This code BoogieIdentifierExpr tmpVarExpr = outParams[0]; will call directly outParams[0] without judging whether the outParams is null.

Test Case( Test.sol ):

pragma solidity >=0.4.20;
contract Test {
  function BugTest() public  {
      msg.sender.call.value(123)("");
  }
}
@ghost

ghost commented Jul 20, 2020

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant